#ifndef __CK_DATA_SOURCE_H__
#define __CK_DATA_SOURCE_H__

#include "ckObject.h"
#include "zCore.h"
#include "ckDataProduct.h"
#include <string>

namespace ck
{
	typedef enum ckDataSourceType
	{
		ckFileDataSource = 1,
		ckFolderDataSource,
		ckGDBDataSource,
	}ckDataSourceType;

	class Dataset;
	class DatasetFilter;
	class DatasetProcessor;

	namespace data
	{
		class EnumDataset;
	}
	
	class ZCORE_API DataSource : public ckObject
	{
	public:
		DataSource();
		virtual ~DataSource();

	public:
		virtual RESULTCODE	Open() = 0;
		virtual RESULTCODE	Close() = 0;
		virtual RESULTCODE	Find(DatasetProcessor* pProcessor, DatasetFilter* pFilter) = 0;

		virtual	data::EnumDataset*	GetDatasets(ckDataProductType type) = 0;
		
		z_int32				GetCode();
		void				SetCode(z_int32 code);
		void				SetID(z_int32 id);

		const char*			GetName();
		void				SetName(const char* szName);

		void				SetPath(const char* szPath);
		const char*			GetPath();

		ckDataSourceType	GetType();

	public:
		
		
	protected:
		z_int32				m_code;
		ckDataSourceType	m_type;
		std::string			m_strName;
		std::string			m_strPath;
	};

}

#endif //__CK_DATA_SOURCE_H__

